package org.file_service.entity;

import org.jetbrains.annotations.NotNull;

public class Huxing implements Comparable<Huxing> {
    private String type;//户型种类
    private String zone;//区域
    private Integer historyId;//属于哪一条记录
    private Integer userId;//用户id
    private Integer count;//有多少套房子
    private Double avg_price;//平均价格

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getZone() {
        return zone;
    }

    public void setZone(String zone) {
        this.zone = zone;
    }

    public Integer getHistoryId() {
        return historyId;
    }

    public void setHistoryId(Integer historyId) {
        this.historyId = historyId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getAvg_price() {
        return avg_price;
    }

    public void setAvg_price(Double avg_price) {
        this.avg_price = avg_price;
    }


    @Override
    public int compareTo(@NotNull Huxing o) {
        return o.getCount().compareTo(this.count);
    }
}
